<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core">
<h:form id="WMTreeForm">
	<ui:composition template="/paginas/contenedor.xhtml">
		<ui:define name="detailsPanel">
			<h:messages showDetail="true" showSummary="true"></h:messages>
			<div class="prefix_11 grid_1">
				<h:outputLabel id="refrescarLabel" for="refrescar" value="Monitorear"/>
				<h:graphicImage id="cargando" style="width:25px" value="/paginas/imagenes/cargando.gif"/> 
				<h:selectBooleanCheckbox id="refrescar" value="#{gridBean.monitorear}" />
			</div>
			<div class="clear"/>
			<div class="grid_12">
				<h:commandButton id="consultarTodos" value="Consultar Todos" action="#{gridBean.consultarTodos}"/> 
			</div>
			<div class="grid_12" align="center">
			
				<br />
				<h:dataTable id="nodosTable" var="nodos"
					value="#{gridBean.nodosList}"
					rendered="#{not empty gridBean.nodosList}" bgcolor="#F1F1F1"
					border="5">
					<h:column>
						<f:facet name="header">
							<h:outputText value="" />
						</f:facet>
						<h:commandButton image="/paginas/imagenes/editar.png"
							action="#{gridBean.redirectEditar}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="" />
						</f:facet>
						<h:commandButton image="/paginas/imagenes/eliminar.png"
							action="#{gridBean.eliminar}"
							onclick="return confirm('Esta seguro de eliminar este Nodo?')" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="ID"
								style="font-size: 16px; font-family: Times New Roman, Arial, Sans-Serif; text-align:center;" />
						</f:facet>
						<h:outputText value="#{nodos.id}" style="text-align:center;"></h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="IP"
								style="font-size: 16px; font-family: Times New Roman, Arial, Sans-Serif; text-align:center;" />
						</f:facet>
						<h:outputText value="#{nodos.ip}"></h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="ESTADO"
								style="font-size: 16px; font-family: Times New Roman, Arial, Sans-Serif; text-align:center;" />
						</f:facet>
						<h:outputText value="#{nodos.estado.nombre}"></h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="RUTA JAR"
								style="font-size: 16px; font-family: Times New Roman, Arial, Sans-Serif; text-align:center;" />
						</f:facet>
						<h:outputText value="#{nodos.jar}"></h:outputText>
					</h:column>
					<h:column>
					<f:facet name="header" styleClass="center">
							<h:outputText value="INDICE EJECUCION"
								style="font-size: 16px; font-family: Times New Roman, Arial, Sans-Serif; text-align:center;" />
						</f:facet>
						<h:outputText value="#{nodos.indice}"></h:outputText>
					</h:column>
				</h:dataTable>
				<br /> <br />
				<div align="center">
					<h:commandButton value="Crear Nodo"
						action="#{gridBean.redirectCrear}" />
				</div>
				<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/paginas/js/jquery.gridNodos.js" />
			</div>
		</ui:define>
	</ui:composition>
</h:form>
</html>